Block-diagram modeling simplifies a process of conceptualizing, designing, simulating, and implementing (in software or hardware) custom signal processing systems. A block-diagram model of a signal processing system is represented schematically as a collection of blocks interconnected by lines (directed arrows) that represent signals. Each block represents an elemental dynamic system. A line emanating at one block and terminating at another signifies that the output of the first block is an input to the second block. Each distinct input or output on a block is referred to as a port. Signals correspond to the time-varying data values represented by each line connection and are assumed to have values at each time instant.
Block-diagram models are time-based relationships between signals and state variables representative of a dynamic system. The solution (computation of system response) of the model is obtained by evaluating these relationships over time, where time starts at a user-specified “start time” and ends at a user-specified “stop time”. Each evaluation of these relationships is referred to as a time step. Signals represent quantities that change over time, and these quantities are defined for all points in time between the block-diagram's start and stop time. The relationships between signals and state variables are defined by sets of equations represented by blocks. These equations define a relationship between the input signals, output signals, and state variables. Inherent in the definition is the notion of parameters, which are the coefficients of the equations. The block-diagram modeling approach has spawned a variety of software products such as Simulink® that cater to various aspects of system analysis and design.
The data values of a signal are generally a collection of one or more individual data elements. Such a collection of data elements for a given signal is generally stored in a memory buffer that is called a block I/O buffer because signals correspond to the input and output ports of blocks. While data elements are largely numeric, data elements can also take other forms, such as strings or objects with multiple attributes.
One of the primary tasks of modeling software is to enable the computation and tracing of a dynamic system's outputs from its block-diagram model. An execution engine carries out the task of executing a block-diagram model in four stages: compilation, link, code generation, and execution loop. The compile stage involves checking the integrity and validity of the block interconnections in the block-diagram. In this stage, the engine also sorts the blocks in the block-diagram into hierarchical lists that indicate the order in which blocks need to be executed in order to execute the overall block-diagram. In the link stage, the engine uses the result of the compiled stage to allocate memory needed for the execution of the various components of the block-diagram. This stage also produces execution lists, distilled versions of the block sorted-lists that are suitable for efficient execution. The next stage in the engine that involves code generation is optional. In this stage, the engine could choose to translate the block-diagram model (or portions of it) into either software modules or hardware descriptions (broadly termed code). If this stage is performed, then the link and execute stages which follow would use the generated code during the execution of the block-diagram. If this stage is skipped completely, then the engine would use an interpretive mode of execution for the block-diagram. In some cases, the user can even not proceed further with the execution of the block-diagram because they would like to deploy the code outside the confines of the block-diagram software. Finally, in the execution loop stage, the engine uses an execution loop to run over the execution lists and trace the system's response over time.